import java.util.Random;
import java.util.Scanner;

public class test{
    //判断一个正整数是否为2的K次方
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        if((input & (input - 1)) == 0){
            System.out.println("Yes!");
        }
        else{
            System.out.println("No!");
        }
    }
    //判断一个数的二进制中有几个一
    public static void main16(String[] args){
        Scanner scanner = new Scanner(System.in);
        int count = 0;
        int input = scanner.nextInt();
        while(input != 0){
            if((input & 1) == 1){
                count++;
            }
            input >>>= 1;
        }
        System.out.println(count);
    }
    //最大公约数（辗转相除）
    public static void main15(String[] args){
        int a = 24;
        int b = 18;
        int c = a % b;
        while(c != 0){
            a = b;
            b = c;
            c = a % b;
        }
        System.out.println("最大公因数为:" + b);


    }
    //判定素数优化2
    public static void main14(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        int i = 0;
        for (i = 2; i <= Math.sqrt(input); i++) {
            if (input % i == 0) {
                break;
            }
        }
        if (i > Math.sqrt(input)) {
            System.out.println(input + "是素数!");
        } else {
            System.out.println(input + "不是素数!");
        }
    }
    //判定素数优化1
    public static void main13(String[] args){
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        int i = 0;
        for(i = 2; i <= input/2; i++){
            if(input % i == 0){
                break;
            }
        }
        if(i > input/2){
            System.out.println(input + "是素数!");
        }
        else{
            System.out.println(input + "不是素数!");
        }
    }
    //1~100中9的个数
    public static void main12(String[] args){
        int count = 0;
        int i = 0;
        for(i = 1; i <= 100; i++){
            if(i % 10 == 9){
                count++;
            }
            if(i/10%10 == 9){
                count++;
            }
        }
        System.out.println("9的个数为:" + count);
    }
    //判定素数
    public static void main11(String[] args){
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        int i = 0;
        for(i = 2; i < input; i++){
            if(input % i == 0){
                break;
            }
        }
        if(i == input){
            System.out.println(input + "是素数!");
        }
        else{
            System.out.println(input + "不是素数!");
        }
    }
    //1~100间素数
    public static void main10(String[] args){
        int i = 0;
        for(i = 1; i <= 100; i++){
            int j = 0;
            for(j = 2; j < i; j++){
                if(i % j == 0){
                    break;
                }
            }
            if(j == i){
                System.out.print(i + " ");
            }
        }

    }

    //1000~2000之间的闰年
    public static void main9(String[] args){
        int i = 0;
        for(i = 1000; i < 2000; i++){
            if(((i % 4 == 0) && (i % 100 != 0)) || (i % 400 == 0)){
                System.out.print(i + " ");
            }
        }
    }
    //求两数的最大公因数
    public static void main8(String[] args){
        Scanner scanner = new Scanner(System.in);
        int input1 = scanner.nextInt();
        int input2 = scanner.nextInt();
        int min = input1 < input2 ? input1 : input2;
        int i = 0;
        for(i = min; i != 0; i--){
            if((input1 % i == 0) && (input2 % i == 0)){
                System.out.println("最大公因数是:" + i);
                break;
            }
        }
    }
    //打印X
    public static void main7(String[] args){
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        int i = 0;
        for(i = 1; i <= input; i++){
            int j = 0;
            for(j = 1; j <= input; j++){
                if(i == j || i + j == (input + 1)){
                    System.out.print("*");
                }
                else{
                    System.out.print(" ");
                }
            }
            System.out.println();
        }

    }
    //水仙花数
    public static int fun(int x){
        return x*x*x;
    }
    public static void main6(String[] args){
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        int i = 0;
        for(i = 100; i <= input; i++){
            if(fun(i%10) + fun(i/10%10) + fun(i/100%10) == i){
                System.out.println(i);
            }
        }
    }
    //密码
    public static void main5(String[] args){
        int count = 3;//机会
        int key = 12345;
        while(count != 0){
            System.out.print("请输入密码:");
            Scanner scanner = new Scanner(System.in);
            int input = scanner.nextInt();
            if(input == key){
                System.out.println("恭喜你输入正确!");
                break;
            }
            count--;
            System.out.println("很抱歉，输入错误,你还有" + count + "次机会！");
        }
    }
    //乘法口诀表n*n
    public static void main4(String[] args){
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        for(int i = 1; i <= input; i++){
            for(int j = 1; j <= i; j++){

                System.out.print(i + "*" + j + "=" + (i*j) + " ");
            }
            System.out.print("\n");
        }
    }

    //判断年龄
    public static void main3(String[] args){
        Scanner scanner = new Scanner(System.in);
        int age = scanner.nextInt();
        if(age >= 0 &&age <= 18){
            System.out.println("少年~");
        }
        else if(age > 18 && age <= 28){
            System.out.println("青年~");
        }
        else if(age > 28 && age <= 55){
            System.out.println("中年~");
        }
        else {
            System.out.println("老年~");
        }
    }

    //方法实现1!+2!+3!+4!+5!
    public static int fun2(int input){
        int ret = 1;
        int i = 1;
        for(i = 1; i <= input; i++){
            ret *= i;
        }
        return ret;
    }
    public static int fun1(int input){
        int sum = 0;
        for(int i = 1; i <= input; i++){
            sum += fun2(i);
        }
        return sum;
    }

    public static void main2(String[] args){
        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        int ret = fun1(input);
        System.out.println(ret);
    }


    public static void main1(String[] args){
        //猜数字游戏
        //生成随机数
        Random ran = new Random();
        int randNum = ran.nextInt(101);//[0~101)
        //int randNum = ran.nextInt(100)+1;//[1~101)
        while(true){
            System.out.print("请输入数字:");
            Scanner scanner = new Scanner(System.in);
            int input = scanner.nextInt();
            if(input > randNum){
                System.out.println("猜大了!");
            }
            else if(input < randNum){
                System.out.println("猜小了!");
            }
            else{
                System.out.println("恭喜你猜中了!");
                break;
            }
        }
    }
}